home *** CD-ROM | disk | FTP | other *** search
- package org.apache.xalan.xpath;
-
- import org.xml.sax.SAXException;
-
- public class XBoolean extends XObject {
- boolean m_val;
-
- public XBoolean(boolean var1) {
- this.m_val = var1;
- }
-
- public int getType() {
- return 1;
- }
-
- private String getTypeString() {
- return "#BOOLEAN";
- }
-
- public double num() {
- return this.m_val ? (double)1.0F : (double)0.0F;
- }
-
- public boolean bool() {
- return this.m_val;
- }
-
- public String str() {
- return this.m_val ? "true" : "false";
- }
-
- public Object object() {
- return new Boolean(this.m_val);
- }
-
- public boolean equals(XObject var1) throws SAXException {
- if (var1.getType() == 4) {
- return var1.equals(this);
- } else {
- return this.m_val == var1.bool();
- }
- }
- }
-